package com.chushouya.order.service.partner.impl;

import com.general.framework.core.lang.Beans;
import com.chushouya.order.dto.api.order.OrderSubmitApiDTO;
import com.chushouya.order.dto.api.order.OrderUserApiDTO;
import com.chushouya.order.dto.partner.order.OrderSubmitPartnerDTO;
import com.chushouya.order.service.api.OrderSubmitApiService;
import com.chushouya.order.service.partner.OrderPartnerApiService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class OrderPartnerApiServiceImpl implements OrderPartnerApiService {

    @Resource
    private OrderSubmitApiService orderSubmitApiService;

    @Override
    public OrderUserApiDTO submitOrder(OrderSubmitPartnerDTO data) {
        OrderSubmitApiDTO orderSubmitApiDTO = Beans.copy(data, OrderSubmitApiDTO.class);
        return orderSubmitApiService.submitOrder(orderSubmitApiDTO);
    }
}
